import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class text90 {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket=new ServerSocket(8888);
        Socket socket=serverSocket.accept();
        InputStream is=socket.getInputStream();
        byte [] buffer=new byte[1024];
        int len=is.available();
        is.read(buffer);
        String str=new String(buffer);
        System.out.println(str);

    }
}
